package main

import "fmt"

func main() {
    min, max := 0, 100
    fmt.Printf("Please input a integer %d~%d:\n", min, max)
    for min < max {
        i := (min + max) / 2
        fmt.Printf("the integer less then or equal %d? (y/n)", i)
        var s string
        fmt.Scanf("%s", &s)
        if s != "" && s[0] == 'y' {
            max = i
        } else {
            min = i + 1
        }
    } 
    fmt.Printf("the integer is %d\n", max)
}